<template>
	<view class="item-info">
		<view class="img-box">
			<u--image :src="item.serviceImage" width="150rpx" height="150rpx" radius="12rpx"
				:errorIcon="errIcon"></u--image>
		</view>
		<view class="right-content">
			<view class="title" :class="txtType==='one'?'ellipses-one':''">{{item.serviceName}}</view>
			<view class="price">
				<view class="p-left">
					<text class="txt">{{item.servicePrice}}</text><text class="icon">陪护豆</text>
				</view>
				<view class="p-right">X{{item.num}}</view>
			</view>
			<view class="time">{{item.appointmentDate}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			txtType: {
				type: String,
				default: 'one'
			},
			item: {
				type: [Object, String],
				default: {}
			}
		},
		data() {
			return {

			}
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.item-info {
		display: flex;

		.img-box {
			width: 150rpx;
		}

		.right-content {
			flex: 1;
			min-width: 0;
			padding-left: 30rpx;
			.title {
				margin-bottom: 20rpx;
			}

			.price {
				display: flex;
				align-items: center;
				margin-bottom: 20rpx;
				justify-content: space-between;
				.p-left {
					color: $uni-price-color;

					.txt {
						font-weight: 600;
						margin-right: 10rpx;
					}

					.icon {
						font-size: 24rpx;
					}
				}

				.p-right {
					font-size: 24rpx;
					color: $uni-color-666;
				}
			}
			.time{
				font-size: 20rpx;
				color: $uni-color-999;
			}
		}
	}
</style>
